<#assign className = table.className>
<#assign classNameLower = table.classNameLower><#if  '${subpackage}'=="">
package ${basepackage}.feignclients;
<#else>
package ${basepackage}.${subpackage}.feignclients;
</#if>

import com.github.pagehelper.PageInfo;
import{basepackage}.${subpackage}.intf.entity.${className};
import com.yr.dj.util.dt.PageQuery;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

<#include "java_copyright.include">

@FeignClient(value = "${serverName}")
@RequestMapping("/${table.sqlName}")
public interface ${className}Client  {

    @RequestMapping(value = "/save_or_update", method = RequestMethod.POST)
    boolean saveOrUpdate(@RequestBody ${className} ${classNameLower},@RequestParam("userId") Integer userId);

    @RequestMapping(value = "/update_selective", method = RequestMethod.POST)
    boolean updateSelective(@RequestBody ${className} ${classNameLower});

    @RequestMapping(value = "/delete", method = RequestMethod.POST)
    boolean delete(@RequestParam("id") Integer id);

    @RequestMapping(value = "/load_by_search", method = RequestMethod.POST)
    PageInfo<${className}> loadBySearch(@RequestBody PageQuery query);

    @RequestMapping(value = "/load_by_entity", method = RequestMethod.POST)
    PageInfo<${className}> loadByEntity(@RequestParam("pageNum") Integer pageNum,@RequestParam("pageSize") Integer pageSize,@RequestBody ${className} ${classNameLower});

    @RequestMapping(value = "/load_one", method = RequestMethod.POST)
    ${className} loadOne(@RequestBody ${className} ${classNameLower});
}

